'use strict';

const axios = require('axios');
const baseURL = process.env.YSX_CLI_TEMPLATE_BASE_URL || 'http://cli.ysx.com:7001';
const request = axios.create({
  baseURL,
  timeout: 5000
});

request.interceptors.response.use(response => response.data, error => Promise.reject(error));

module.exports = request;
